/**
 * 终结（血量月底伤害越高）
 */

import { Card } from "../class/Card";
import { Context } from "../class/Context";
import { Hurt } from "../class/Hurt";

export class End extends Card {
    static cardName = "终结"
    static description = "对目标发起刺杀，造成 10%(LossHP) + 500 点真实伤害。"
    public outHook(context: Context): void {
        const itId = context.nextParam();
        const it = this.masterRole.game.getRole(itId);

        // 计算伤害
        const TD = Math.floor(it.getLossHP() * 0.1) + 500;
        // 造成伤害
        it.onHurt(this.masterRole, new Hurt(0, 0, TD))
    }

}